package com.uphone.kingmall.adapter;

import android.widget.ImageView;

import com.blankj.utilcode.util.SizeUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.china.zhuoyue.R;
import com.uphone.kingmall.bean.FlashSalesListBean;
import com.uphone.kingmall.utils.GlideUtils;

/**
 * author : SuMeng
 * e-mail : 986335838@qq.com
 * time   : 2019/02/18
 * desc   : 限时购adpater
 */
public class XianShiGouListAdpater extends BaseQuickAdapter<FlashSalesListBean.DataBean, BaseViewHolder> {

//    @BindView(R.id.iv_icon)
//    ImageView ivIcon;
//    @BindView(R.id.tv_name)
//    TextView tvName;
//    @BindView(R.id.tv_price)
//    TextView tvPrice;
//    @BindView(R.id.tv_kanjia)
//    TextView tvKanjia;

    public XianShiGouListAdpater() {
        super(R.layout.kingmall_item_goodslist_liner);
    }

    @Override
    protected void convert(final BaseViewHolder helper, final FlashSalesListBean.DataBean item) {
        helper.setText(R.id.tv_price, "¥" + item.getGoodsPrice());
        helper.setText(R.id.tv_name, "" + item.getGoodsName());
        helper.setText(R.id.tv_yue_xiao, "月销" + item.getGoodsSaleNum());
        ImageView iv_lawyer_icon = helper.getView(R.id.iv_icon);
        GlideUtils.getInstance().loadCornerImage(mContext, item.getGoodsMainImg(), SizeUtils.dp2px(2), iv_lawyer_icon);

    }
}